import React, { Component } from 'react'
import Hello from './components/Hello'

export default class LayOut extends Component {

  constructor(props) {
    super(props)
    this.state = {
      count: 0
    }
  }
  increment = () => {
    this.setState({
      count: ++this.state.count
    })
  }

  render () {
    const { count } = this.state
    return (
      <div>
        <button onClick={this.increment}>+</button>
        <p>{count}</p>
        <Hello />
      </div>
    )
  }
}
